﻿namespace Common.Helpers
{
    public class ChartScale
    {
        public int TotalMilliseconds { get; set; }

        public int StepMilliseconds { get; set; }

        public static ChartScale GetScale(int index)
        {
            var scale = new ChartScale();
            switch (index)
            {
                case 0:
                    scale.TotalMilliseconds = 6 * 3600000;
                    scale.StepMilliseconds = 30 * 60000;
                    break;
                case 1:
                    scale.TotalMilliseconds = 3 * 3600000;
                    scale.StepMilliseconds = 15 * 60000;
                    break;
                case 2:
                    scale.TotalMilliseconds = 2 * 3600000;
                    scale.StepMilliseconds = 10 * 60000;
                    break;
                case 3:
                    scale.TotalMilliseconds = 30 * 60000;
                    scale.StepMilliseconds = 25 * 6000;
                    break;
                case 4:
                    scale.TotalMilliseconds = 12 * 60000;
                    scale.StepMilliseconds = 60000;
                    break;
                case 5:
                    scale.TotalMilliseconds = 6 * 60000;
                    scale.StepMilliseconds = 30000;
                    break;
                case 6:
                    scale.TotalMilliseconds = 3 * 60000;
                    scale.StepMilliseconds = 15000;
                    break;
                case 7:
                    scale.TotalMilliseconds = 60000;
                    scale.StepMilliseconds = 5000;
                    break;
                case 8:
                    scale.TotalMilliseconds = 10000;
                    scale.StepMilliseconds = 1000;
                    break;
            }

            return scale;
        }
    }
}